//
//  ViewController.swift
//  TCPService
//
//  Created by adel on 2017/9/20.
//  Copyright © 2017年 adel. All rights reserved.
//

import Cocoa
class ViewController: NSViewController {
    
    @IBOutlet weak var serverStatueLB: NSTextField!
    @IBOutlet weak var recvDataLB: NSTextField!
    @IBOutlet weak var startBtn: NSButton!
    @IBOutlet weak var closeBtn: NSButton!
   fileprivate lazy var server : serverManger = serverManger()
    

    override func viewDidLoad() {
        super.viewDidLoad()

    }

    
    @IBAction func startServer(_ sender: Any) {
    server.startServer()
    serverStatueLB.textColor = NSColor.green
    serverStatueLB.stringValue = "服务器已开启"
        
    }
    @IBAction func colseServer(_ sender: Any) {
    server.closeServer()
    serverStatueLB.stringValue = "服务器已关闭"
    serverStatueLB.textColor = NSColor.red

    }


}

